apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
localAPIEndpoint:
  advertiseAddress: {{ ip2 }}
  bindPort: 6443
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: {{ version }}
imageRepository: registry.cn-beijing.aliyuncs.com/kube-zy

apiServer:
  certSANs:
  - "{{ host1 }}"
  - "{{ host2 }}"
  - "{{ host3 }}"
  - "{{ ip1 }}"
  - "{{ ip2 }}"
  - "{{ ip3 }}"
  - "{{ VIP }}"
  - "127.0.0.1"

controlPlaneEndpoint: "{{ VIP }}:8443"

etcd:
  local:
    extraArgs:
      listen-client-urls: "https://127.0.0.1:2379,https://{{ ip2 }}:2379"
      advertise-client-urls: "https://{{ ip2 }}:2379"
      listen-peer-urls: "https://{{ ip2 }}:2380"
      initial-advertise-peer-urls: "https://{{ ip2 }}:2380"
      initial-cluster: "{{ host1 }}=https://{{ ip1 }}:2380,{{ host2 }}=https://{{ ip2 }}:2380"
      initial-cluster-state: existing
    serverCertSANs:
      - {{ host2 }}
      - {{ ip2 }}
    peerCertSANs:
      - {{ host2 }}
      - {{ ip2 }}

networking:
  podSubnet: "10.244.0.0/16"